package com.example.touchtest;

import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.widget.FrameLayout;
import android.view.View.OnTouchListener;

public class View2 extends FrameLayout implements OnTouchListener{
	private String TAG=this.getClass().getSimpleName();
	public View2(Context context, AttributeSet attrs) {
		super(context, attrs);
		this.setOnTouchListener(this);
		// TODO Auto-generated constructor stub
	}
	@Override
	public boolean dispatchTouchEvent(MotionEvent ev) {
		// TODO Auto-generated method stub
		//		ev.getAction() MotionEvent.
		Log.d(TAG,"dispatchTouchEvent:"+ActionUtil.getActionType(ev));
		boolean result=super.dispatchTouchEvent(ev);
		Log.d(TAG, "dispatchTouchEvent return:"+result);
		return result;
	}

	@Override
	public boolean onInterceptTouchEvent(MotionEvent ev) {
		// TODO Auto-generated method stub
		Log.d(TAG,"onInterceptTouchEvent:"+ActionUtil.getActionType(ev));
		return super.onInterceptTouchEvent(ev);
	}

	@Override
	public boolean onTouchEvent(MotionEvent event) {
		// TODO Auto-generated method stub
		Log.d(TAG,"onTouchEvent:"+ActionUtil.getActionType(event));
		return super.onTouchEvent(event);
	}
	@Override
	public boolean onTouch(View v, MotionEvent event) {
		// TODO Auto-generated method stub
		Log.d(TAG,"onTouch:"+ActionUtil.getActionType(event));
		return true;
	}
}
